package com.naiterui.ehp.bs.doctor.domain;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

@Entity
@Table(name = "dr_tax_certification_audit")
public class TaxCertificationAudit {

    /**
     * 未申请
     */
    public static final int NOT_APPLY = 0;

    /**
     * 审核中
     */
    public static final int IN_REVIEW = 1;

    /**
     * 审核通过
     */
    public static final int APPROVED = 2;

    /**
     * 审核失败
     */
    public static final int AUDIT_FAILURE = 3;

    private long id;

    private long doctorId;

    /**
     * 审核状态(0,未申请;1,审核中；2,审核通过;3,审核失败)
     */
    private int auditStatus;

    /**
     * 审核失败原因
     */
    private String failureReason;

    /**
     * 审核失败选择框原因
     */
    private String selectReason;

    /**
     * 知情同意书 0:未确认 1:同意
     */
    private int informedConsent;

    private String createdBy;

    private Date createdAt;

    private String changedBy;

    private Date changedAt;

    private Integer version;

    public TaxCertificationAudit() {
    }

    public TaxCertificationAudit(long doctorId, int auditStatus) {
        this.doctorId = doctorId;
        this.auditStatus = auditStatus;
        this.createdAt = new Date();
        this.createdBy = "system";
    }

    @Id
    @Column(name = "id", nullable = false)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "doctor_id", nullable = false)
    public long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(long doctorId) {
        this.doctorId = doctorId;
    }

    @Basic
    @Column(name = "audit_status", nullable = false)
    public int getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(int auditStatus) {
        this.auditStatus = auditStatus;
    }

    @Basic
    @Column(name = "failure_reason", nullable = true, length = 255)
    public String getFailureReason() {
        return failureReason;
    }

    public void setFailureReason(String failureReason) {
        this.failureReason = failureReason;
    }

    @Basic
    @Column(name = "select_reason")
    public String getSelectReason() {
        return selectReason;
    }

    public void setSelectReason(String selectReason) {
        this.selectReason = selectReason;
    }

    @Basic
    @Column(name = "informed_consent", nullable = false)
    public int getInformedConsent() {
        return informedConsent;
    }

    public void setInformedConsent(int informedConsent) {
        this.informedConsent = informedConsent;
    }

    @Basic
    @Column(name = "created_by", nullable = true, length = 20)
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Basic
    @Column(name = "created_at", nullable = true)
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Basic
    @Column(name = "changed_by", nullable = true, length = 20)
    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    @Basic
    @Column(name = "changed_at", nullable = true)
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Basic
    @Version
    @Column(name = "version", nullable = true)
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

}

